fix(dav): Stop sending reminders for deleted calendar events#59145
Draft
joshtrichards wants to merge 2 commits intomasterfrom
Draft
fix(dav): Stop sending reminders for deleted calendar events#59145joshtrichards wants to merge 2 commits intomasterfrom
joshtrichards wants to merge 2 commits intomasterfrom
Conversation
The getRemindersToProcess() query joined calendarobjects without filtering out soft-deleted (trashed) objects. This caused reminders to continue firing for events the user had already deleted, since deletion moves objects to the trashbin rather than removing them from the calendarobjects table. Add a deleted_at IS NULL condition to the calendarobjects join so trashed objects are excluded from reminder processing. Additionally: - Remove unnecessary GROUP BY (joins are on primary keys with no aggregate functions, so no duplicate rows are possible) - Add $stmt->free() to release database cursors after fetching - Clean up redundant docblocks and fix typos - Extract column list for readability Fixes: #53497 Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Notifications were still being sent for calendar events that had been deleted (moved to the trashbin).
Changes
co.deleted_at IS NULLto thecalendarobjectsjoin condition so trashed objects are excluded from reminder processingGROUP BY$stmt->free()to both query methods to release database cursorsOnly true changes: lines 53-55 (former line 43) and the dropping of the
groupBy(former line 46).TODO
Checklist
3. to review, feature component)stable32)AI (if applicable)